package com.distributeredis.redis_springboot.springbootinterceptor.springbootinterceptortest.controller;

import com.distributeredis.redis_springboot.springbootinterceptor.springbootinterceptortest.service.TestDogService;
import com.distributeredis.redis_springboot.springbootinterceptor.springbootinterceptortest.service.impl.TestDogServiceImpl;
import com.distributeredis.redis_springboot.springbootinterceptor.springbootinterceptortest.vo.TestDog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/dog")
public class TestDogController {

    @Autowired
    private TestDogServiceImpl testDogService;

    @PostMapping("/test")
    public TestDog test1(@RequestBody TestDog testDog) {
        System.out.println(testDog);
        return testDogService.test1(testDog);
    }

    @PostMapping("/test2")
    public TestDog test2(@RequestBody TestDog testDog) {
        System.out.println(testDog);
        return testDogService.test2(testDog);
    }

    @GetMapping("/test3")
    public TestDog test3(TestDog testDog) {
        System.out.println(testDog);
        return testDogService.test3(testDog);
    }

}
